package cn.jingyuan.owl.utils.core.bean;

import cn.jingyuan.owl.utils.core.StringUtils;
import cn.jingyuan.owl.utils.core.exceptions.ExceptionUtils;

/**
 * Bean 异常
 */
public class BeanException extends RuntimeException {

    public BeanException(Throwable e) {
        super(ExceptionUtils.getMessage(e), e);
    }

    public BeanException(String message) {
        super(message);
    }

    public BeanException(String messageTemplate, Object... params) {
        super(StringUtils.format(messageTemplate, params));
    }

    public BeanException(String message, Throwable throwable) {
        super(message, throwable);
    }

    public BeanException(Throwable throwable, String messageTemplate, Object... params) {
        super(StringUtils.format(messageTemplate, params), throwable);
    }

}
